package pag.client.ui;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class Sun extends JPanel
{

	private static final long serialVersionUID = -7966582668673195756L;

	/**
	 * Ein Image Objekt in dem das Login Bild geladen wird.
	 */
	Image a;
	Image b;
	Image c;
	Image d;
	Image e;
	Image f;
	Image center;
	
	/**
	 * Create the panel.
	 */
	public Sun()
	{
		setBackground(Color.WHITE);
		a = new ImageIcon(this.getClass().getResource("/pag/resources/1.png")).getImage();
		b = new ImageIcon(this.getClass().getResource("/pag/resources/1h.png")).getImage();
		c = new ImageIcon(this.getClass().getResource("/pag/resources/1.png")).getImage();
		d = new ImageIcon(this.getClass().getResource("/pag/resources/1.png")).getImage();
		e = new ImageIcon(this.getClass().getResource("/pag/resources/1.png")).getImage();
		f = new ImageIcon(this.getClass().getResource("/pag/resources/1.png")).getImage();
	}
	
	/**
	 * Zeichnet das Bild in das Panel.
	 */
	@Override
	protected void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		//g.drawImage(a, 0, 0, 150, 150, this);
		Graphics2D g2 = (Graphics2D) g;
		
		// oben
        g2.drawImage(a, 50, 0, 30, 45, this);
        
        // oben rechts
        g2.rotate(Math.PI/3, 15, 22.5);
        g2.drawImage(b, 0, 0, 30, 45, this);
        
        // unten rechts
        g2.rotate(Math.PI/3, 15, 22.5);
        g2.drawImage(c, 0, 0, 30, 45, this);
	}

}
